package com.lance.answer.gui.answer.gk.answer.lms.batch.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class ExamSubmission {


    @JsonProperty("auto_mark")
    private Boolean autoMark;
    @JsonProperty("correct_answers_data")
    private List<?> correctAnswersData;
    @JsonProperty("is_simulated")
    private Boolean isSimulated;
    @JsonProperty("score")
    private Integer score;
    @JsonProperty("subjects_data")
    private SubjectsDataDTO subjectsData;
    @JsonProperty("submission_comment_data")
    private SubmissionCommentDataDTO submissionCommentData;
    @JsonProperty("submission_data")
    private SubmissionDataDTO submissionData;
//    @JsonProperty("submission_score_data")
//    private SubmissionScoreDataDTO submissionScoreData;

    @NoArgsConstructor
    @Data
    public static class SubjectsDataDTO {
        // TODO 题目的正确答案在这里！！！！！！！！！！！！！！
        @JsonProperty("subjects")
        private List<SubjectsDTO> subjects;

        @NoArgsConstructor
        @Data
        public static class SubjectsDTO {
            @JsonProperty("answer_explanation")
            private String answerExplanation;
            @JsonProperty("answer_number")
            private Integer answerNumber;
            @JsonProperty("correct_answers")
            private List<?> correctAnswers;
            @JsonProperty("data")
            private DataDTO data;
            // 题目的标题
            @JsonProperty("description")
            private String description;
            @JsonProperty("difficulty_level")
            private String difficultyLevel;
            @JsonProperty("id")
            // 题目的ID
            private Long id;
            @JsonProperty("last_updated_at")
            private String lastUpdatedAt;
            @JsonProperty("note")
            private Object note;
            @JsonProperty("options")
            private List<Option> options;
            @JsonProperty("parent_id")
            private Object parentId;
            @JsonProperty("point")
            private String point;
            @JsonProperty("settings")
            private SettingsDTO settings;
            @JsonProperty("sort")
            private Integer sort;
            @JsonProperty("sub_subjects")
            private List<?> subSubjects;
            // 题目的类型
            @JsonProperty("type")
            private String type;
            @JsonProperty("wrong_explanation")
            private String wrongExplanation;

            @NoArgsConstructor
            @Data
            public static class Option {
                private String content;
                private String text;
                private long id;
                private long sort;
            }

            @NoArgsConstructor
            @Data
            public static class DataDTO {
            }

            @NoArgsConstructor
            @Data
            public static class SettingsDTO {
            }
        }
    }

    @NoArgsConstructor
    @Data
    public static class SubmissionCommentDataDTO {
    }

    @NoArgsConstructor
    @Data
    public static class SubmissionDataDTO {
        @JsonProperty("progress")
        private ProgressDTO progress;
        @JsonProperty("subjects")
        private List<SubjectsDTO> subjects;

        @NoArgsConstructor
        @Data
        public static class ProgressDTO {
            @JsonProperty("answered_num")
            private Integer answeredNum;
            @JsonProperty("total_subjects")
            private Integer totalSubjects;
        }

        @NoArgsConstructor
        @Data
        public static class SubjectsDTO {
            @JsonProperty("answer_option_ids")
            private List<Long> answerOptionIds;
            @JsonProperty("subject_id")
            private Long subjectId;
            @JsonProperty("subject_updated_at")
            private String subjectUpdatedAt;
            // 题目的答案！！！！！！！！！！！！！
            @JsonProperty("answers")
            private List<AnswersDTO> answers;

            @NoArgsConstructor
            @Data
            public static class AnswersDTO {
                // 题目的正确答案！！！！！！！！！！！！
                @JsonProperty("content")
                private String content;
                @JsonProperty("sort")
                private Integer sort;
            }
        }
    }
//
//    @NoArgsConstructor
//    @Data
//    public static class SubmissionScoreDataDTO {
//        @JsonProperty("20000989405")
//        private String $20000989405;
//        @JsonProperty("20000989407")
//        private String $20000989407;
//        @JsonProperty("20000989410")
//        private String $20000989410;
//        @JsonProperty("20000989412")
//        private Object $20000989412;
//        @JsonProperty("20000989413")
//        private String $20000989413;
//        @JsonProperty("20000989415")
//        private String $20000989415;
//        @JsonProperty("20000989418")
//        private String $20000989418;
//        @JsonProperty("20000989420")
//        private String $20000989420;
//        @JsonProperty("20000989421")
//        private String $20000989421;
//        @JsonProperty("20000989424")
//        private String $20000989424;
//        @JsonProperty("20000989425")
//        private String $20000989425;
//        @JsonProperty("20000989428")
//        private String $20000989428;
//        @JsonProperty("20000989429")
//        private String $20000989429;
//        @JsonProperty("20000989431")
//        private String $20000989431;
//        @JsonProperty("20000989434")
//        private String $20000989434;
//        @JsonProperty("20000989436")
//        private String $20000989436;
//        @JsonProperty("20000989438")
//        private String $20000989438;
//        @JsonProperty("20000989439")
//        private String $20000989439;
//        @JsonProperty("20000989442")
//        private String $20000989442;
//        @JsonProperty("20000989443")
//        private String $20000989443;
//    }
}
